﻿using UnityEngine;
using System.Collections;
namespace CommandModel{
	// "Receiver" 
	public class Receiver 
	{ 
		// Methods 
		public void Action() 
		{ 
			Debug.Log (" go");
		} 
	} 



	public class Calculator{
		// Fields 
		private int total = 0; 

		// Methods 
		public void Operation( char @operator, int operand ) 
		{ 
			int cached = total;
			switch( @operator ) 
			{ 
			case '+': total += operand; break; 
			case '-': total -= operand; break; 
			case '*': total *= operand; break; 
			case '/': total /= operand; break; 
			} 
			Debug.Log ( cached +" "+@operator+" " +operand+" = " + total); 
		} 
	}
}